<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>
<%@ taglib tagdir="/WEB-INF/tags/simpletable" prefix="simpletable"%>

<jsFileName><!--js/pageJS/page_attendance.js;js/My97DatePicker/WdatePicker.js--></jsFileName>
<s:form id="query_attendance_list_form" name="query_attendance_list_form" method="post" action="attendance/search.do">
<div  class="con_wrap_padding">
	<div class="trans_operate_box clearfix">
		<div class="operate_btns">			
		</div>
		<div class="trans_type_search">
			员工编号：<s:textfield name="ygbh" size="10"/>
			员工姓名：<s:textfield name="name" size="10"/>
			部门：<s:textfield name="deptname" size="10"/>
	    	时间：<s:textfield name="regtimeBegin" size="10" onclick="WdatePicker({dateFmt:'yyyy-MM'})"/>
	    	<a class="btn_short" name="button" id="button" href="javascript:void(0)" title="搜索" onclick="QueryAttendanceListUtils.query()">搜索</a>
	    	<a class="btn_short" name="button" id="button" href="javascript:void(0)" title="导出" onclick="QueryAttendanceListUtils.jldc()">导出</a>
		</div>   
	</div>
	<table id="dataGridTable_attendance" width="98%" class="dhtmlxGrid" imgpath="skins/default/images/dhtmlx/" lightnavigation="true" style="table-layout:fixed">
		<tr>
			<td align="center">工号</td>
			<td align="center">姓名</td>
			<td align="center">部门</td>
			<td align="center">在岗天数</td>
			<td align="center">餐补金额</td>
		</tr>
		<c:forEach items="${page.result}" var="item" varStatus="status">
		<tr>
			<td align="left"><span title='${item.ygbh}'>${item.ygbh}</span></td>
			<td align="left">${item.name}</td>
			<td align="left">${item.deptname}</td>
			<td align="left">${item.zgts}</td>
			<td align="left">${item.cbje}</td>
		</tr>
		</c:forEach>
		
		<c:if test="${fn:length(page.result)==0}">
		<tr>
	    	<td colspan="5"><div class="note_red_in_div">系统没有查找到符合条件的数据！</div></td>
	    </tr>
	    </c:if>
	</table>
	<input type="hidden" name="pageNumber" value="${page.thisPageNumber}"/>
	<input type="hidden" name="pageSize" value="${page.pageSize}"/>
	<simpletable:pagingToolbar page="${page}"/>
 	</div>
</s:form>
<script>
	QueryAttendanceListUtils = {};
	
	/**
	 * 条件查询
	 */
	QueryAttendanceListUtils.query = function() {
		//强行设置当前页为第一页
		var currentPage = $("query_attendance_list_form").pageNo;
		if(currentPage) 
			currentPage.value = 1;
		$("query_attendance_list_form").action = "attendance/search.do";
		Ext.milan.pagejs.page_attendance.query("query_attendance_list_form");
	};
	
	QueryAttendanceListUtils.jldc = function() {
		$("query_attendance_list_form").action = "attendance/export.do";
		Ext.milan.pagejs.page_attendance.jldc('query_attendance_list_form');
	};
	
</script>